<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta name="keywords" content="">
<meta name="description" content="">
<meta name="renderer" content="webkit">
<meta name="force-rendering" content="webkit">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<link rel="stylesheet" href="/static/layui/css/layui.css" media="all">
<link charset="utf-8" rel="stylesheet" type="text/css" href="/static/ali/ali.css" />
<link charset="utf-8" rel="stylesheet" type="text/css" href="/static/ali/home.css" />
<title>友利钱包账户中心</title>
</head>
<body>
	#include("common/header.html", site="home")
		
	<div class="content">
		<div class="content-wrapper">
			<div class="content-left">
				<div class="menu-title">账户中心</div>
				<div class="menu-group">
					#include("common/sider.html", site="withdraw")
				</div>
			</div>
			<div class="content-right">
				<div class="main-title">提款制单</div>
				<div class="option-panel">
					<form method="post" class="layui-form" action="/customer/home/preview">
						<input type="hidden" name="tradeType" value="withdraw">
						<div class="form-item">
							<div class="form-label">银行卡</div>
							<div class="form-value">
								<select name="contactsId" lay-ignore required lay-verify="required" lay-verType="tips">
									<option value="">- 请选择 -</option>
									#for(item : selfBankCardList)
									<option value="#(item.id)">#(item.contactsShow)</option>
									#end
								</select>
								<a href="/customer/contacts/index">管理</a>
							</div>
						</div>
						<div class="form-item">
							<div class="form-label">提款金额</div>
							<div class="form-value"><input type="number" min="0.00" step="0.01" name="amount" id="amount" required  lay-verify="amount" lay-verType="tips" oninput="if(value.length>10)value=value.slice(0,10)" placeholder="0.00"></div>
						</div>
						<div class="big-write-show" id="amountShowBig"></div>
						<div class="form-item">
							<div class="form-label"></div>
							<div class="form-value"><button class="jui-btn jui-btn-blue" lay-submit lay-filter="wallet-form-submit">下一步</button></div>
						</div>
					</form>
				</div>
			</div>
		</div>
	</div>
		
	#include("common/footer.html")
</body>
<script src="/static/layui/layui.js"></script>
<script>
layui.config({
	base: '/static/fly/mods/'
}).extend({
	fly: 'index'
}).use(['layer', 'form', 'fly'], function(){
	var $ = layui.$, layer = layui.layer, form = layui.form, fly = layui.fly;
	// 数字转中文大写
	$("#amount").bind("input",function(event){
		var money = this.value;
		var big = fly.convertCurrency(money)
		$("#amountShowBig").html(big);
	});
	// 表单验证
	form.verify({
		amount: function(value, item){
    		if(!/^(([1-9][0-9]*)|(([0]\.\d{1,2}|[1-9][0-9]*\.\d{1,2})))$/.test(value)){
    			return "请输入正确的金额";
    		}
    	}
	});
});
</script>
</html>